-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: forward kwargs to conversable agent + fix typing #1193
fix: forward kwargs to conversable agent + fix typing #1193
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Any chance you can add two unit tests to https://github.com/microsoft/autogen/blob/main/test/agentchat/contrib/test_compressible_agent.py?
- Verifies the use of the
description
parameter when it is supplied. - Verifies one example kwarg when it is supplied.
@microsoft-github-policy-service agree company="beeps" |
@joshkyh Thanks for the review. I added one test, I can't really test the kwargs in a sensible way atm because all the arguments of |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1193 +/- ##
===========================================
+ Coverage 30.38% 56.85% +26.47%
===========================================
Files 32 32
Lines 4302 4680 +378
Branches 994 1243 +249
===========================================
+ Hits 1307 2661 +1354
+ Misses 2901 1771 -1130
- Partials 94 248 +154
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Can you also add
description (str): a short description of the agent. This description is used by other agents (e.g. the GroupChatManager) to decide when to call upon this agent. (Default: system_message) to the docstring?
I copied this from
https://github.com/microsoft/autogen/blob/71fc6e8952c31ea1492252247698f34419efc08f/autogen/agentchat/conversable_agent.py
@joshkyh done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks good to me.
* fix: forwards kwargs to conversable agent + typing * add description unit test * add documentation for description
* fix: forwards kwargs to conversable agent + typing * add description unit test * add documentation for description
Why are these changes needed?
Agent descriptions should be supported by
CompressibleAgent
.This change makes
CompressibleAgent
behave as it's stated in its documentation, where it says that the kwargs ofConversableAgent
are supported.Also
new CompressibleAgent(description="some description")
gives a type error, because description is not an explicit argument of the constructor.Checks